﻿//-----------------------------------------------------------------------
// <copyright file="SpiteGenSettings.cs" company="Richard Rose IT Ltd">
//     Copyright © 2008-2009 Richard Rose IT Ltd. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace RichardRose.Tools.SpriteGen
{
    using System;
    using System.Collections.ObjectModel;
    using System.Runtime.Serialization;

    using RichardRose.Core;
    using RichardRose.Drawing.Imaging;

    /// <summary>
    /// Defines the configuration settings for the SpriteGen application.
    /// </summary>
    [Serializable()]
    [DataContract(Namespace = "http://www.richardroseit.co.uk/Tools/SpriteGen")]
    public class SpiteGenSettings
    {
        #region Properties

        /// <summary>
        /// Gets or sets the name of the required sprite.
        /// </summary>
        /// <value>The name of the required sprite.</value>
        [DataMember(IsRequired = true, Order = 1)]
        [CommandLineArgument("name", Description = "The name of the required sprite.", IsRequired = false)]
        public virtual string SpriteName
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the image format of the required sprite.
        /// </summary>
        /// <value>Image format of the required sprite.</value>
        [DataMember(IsRequired = false, Order = 2)]
        [CommandLineArgument("format", Description = "Format of the required sprite.", IsRequired = false, DefaultValue = ImageFormat.Png)]
        public virtual ImageFormat SpriteFormat
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the width of the required sprite in pixels.
        /// </summary>
        /// <value>The width of the required sprite in pixels.</value>
        [DataMember(IsRequired = false, Order = 3)]
        [CommandLineArgument("width", Description = "Width of the required sprite in pixels.", IsRequired = false)]
        public virtual int Width
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the height of the required sprite in pixels.
        /// </summary>
        /// <value>The height of the required sprite in pixels.</value>
        [DataMember(IsRequired = false, Order = 4)]
        [CommandLineArgument("height", Description = "Height of the required sprite in pixels.", IsRequired = false)]
        public virtual int Height
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the image spacing interval.
        /// </summary>
        /// <value>The number of pixels between the start of each image in the sprite.</value>
        [DataMember(IsRequired = false, Order = 5)]
        [CommandLineArgument("spacing", Description = "The number of pixels between the start of each image in the sprite.", IsRequired = false, DefaultValue = 100)]
        public virtual int ImageSpacing
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the orientation of the images within the required sprite.
        /// </summary>
        /// <value>Orientation of the images within the required sprite.</value>
        [DataMember(IsRequired = false, Order = 6)]
        [CommandLineArgument("orientation", Description = "Orientation of the images within the required sprite.", IsRequired = false, DefaultValue = Orientation.Vertical)]
        public virtual Orientation ImageOrientation
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the file path to the images to generate the required sprite with.
        /// </summary>
        /// <value>A list of image files to generate the required sprite with.</value>
        [DataMember(IsRequired = true, Order = 7)]
        [CommandLineArgument("images", Description = "A list of image files to generate the required sprite with.", IsRequired = false)]
        public virtual Collection<string> Images
        {
            get;
            set;
        }

        #endregion Properties
    }
}
